<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../../../assets/libs/jquery/jquery-3.6.1.min.js"></script>
</head>

<body>
  <div style="width: 100px; height: 100px; background-color: rgba(17, 119, 255, 0.5);"></div>

  <script>
    $('div').hover(() => {
      console.log('hover')
    })

    $('div').hover(
      () => {
        console.log('mouseenter')
      },
      () => {
        console.log('mouseleave')
      }
    )
  </script>
</body>

</html>